#import <UIKit/UIKit.h>
#import "Map.h"
#import <QuartzCore/CATiledLayer.h>
#import "LoadedImages.h"
//#import "BackgroundProtocol.h"
//#import "NetworkController.h"

@class BackgroundProtocol;
@class NetworkController;
@class NetworkProtocol;

@interface BackgroundView : UIView {
    Map				*map;
	CGPoint			lastPoint;
	CGPoint			currentPoint;
	CGFloat			scale;
	CGSize			tileSize;
	BOOL			backgroundActivated;
	BOOL			drawFirstSquare;
    BOOL            changeAllBackgroundActivated;
}

@property (nonatomic) CGFloat scale;
@property (nonatomic) CGPoint currentPoint;
@property (nonatomic) CGSize tileSize;
@property (nonatomic, retain) Map *map;
@property (nonatomic) BOOL backgroundActivated;
@property (nonatomic) BOOL changeAllBackgroundActivated;

- (id)initWithMap:(Map *)map withTileSize:(CGSize)size withScale:(int)scale;
- (CGPoint)convertCoordsToGridCoords:(CGPoint)coords;
- (void)updateBackgroundAtPoint:(CGPoint)point withImagePath:(NSString *)path;

@end
